/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.blitzcoder.collide.docs;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.ListIterator;

/**
 *
 * @author blitzcoder
 */
public class Scope implements Serializable {

    private String name;
    private LinkedList<Module> modules;
    
    public Scope(String name) {
        this.name = name;
        modules = new LinkedList<Module>();
    }
    
    public String getName() {
        return name;
    }
    
    public LinkedList<Module> getModules() {
        return modules;
    }

    public int countModules() {
        return modules.size();
    }
    
    public void addModule(Module m) {
        modules.addLast(m);
    }
    
    public ListIterator<Module> iterateModules() {
        return modules.listIterator();
    }
    
    @Override
    public String toString() {
        return name;
    }
    
}
